package com.poizon.infrastructure.idem.core.util;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Supplier;

public interface IIdemUtil {
    Object executeIdem(String operationKey, Supplier serviceRunnable, Long expireTime, TimeUnit timeUnit, String reqType, AtomicInteger retryCount);

    Object executeIdem(String operationKey, Supplier serviceRunnable, Long expireTime, TimeUnit
            timeUnit, String reqType);

    Object executeIdem(String operationKey, Supplier serviceRunnable, Long expireTime, TimeUnit timeUnit);

    Object executeIdem(String operationKey, Supplier serviceRunnable, Long expireTime);

    Object executeIdem(String operationKey, Supplier serviceRunnable);
}
